package text_2023_09_20;

import java.util.Comparator;
import java.util.Scanner;
import java.util.TreeSet;

/**
 * @author Vv
 * @version 1.0
 * @project coding_learn
 * @description
 * @date 2023/9/20 21:08:00
 */
class CharacterComparator implements Comparator<Character>{

    @Override
    public int compare(Character o1, Character o2) {
        Character t1 = o1;
        Character t2 = o2;
        if(o1 > ('z')){
            t1 = Character.toLowerCase(o1);
        }else if(o2 > ('z')){
            t2 = Character.toLowerCase(o2);
        }
        return (int)t1 - (int)t2;
    }

//    @Override
//    public boolean equals(Object obj) {
//        //return super.equals(obj);
//    }
}
public class UseTreeSet {
    public static void main(String[] args) {
        TreeSet<Character> set = new TreeSet<>(new CharacterComparator());
        Scanner scanner = new Scanner(System.in);
        String str = scanner.next();
        char[] s = str.toCharArray();
        for(char tem : s){
            set.add(Character.toLowerCase(tem));
        }
        System.out.println(set);


    }
}
